'use strict';

var __importDefault =
    (this && this.__importDefault) ||
    function (mod) {
        return mod && mod.__esModule
            ? mod
            : {
                  default: mod
              };
    };

exports.__esModule = true;
/*
  两种网络请求：postRequest => POST, getRequest => GET
  请求头header: 默认json，支持自定义({})或快速写入('form', 'json')
*/

var request_1 = require('../../utils/request');

var globalData_1 = require('../../globalData');

var marketingRequest = new request_1['default']({
    ApiUrl: globalData_1['default'].marketingUrl
}); // 【站点列表 - 获取站点是否可用优惠】

exports.getListDiscountDetail = function (params) {
    return marketingRequest.postRequest({
        url: 'app/activity/stationDiscount/listDiscountDetail',
        data: params
    });
}; // 【获取站点可使用活动优惠或会员优惠】

exports.getStationPriceDiscount = function (params) {
    return marketingRequest.postRequest({
        url: 'app/activity/station/getPriceDiscount',
        data: params
    });
}; // 【获取站点终端可使用活动优惠或会员优惠】

exports.getTerminalDiscount = function (params) {
    return marketingRequest.postRequest({
        url: 'app/activity/station/getTerminalDiscount',
        data: params
    });
}; // 【站点详情-可用卡券】

exports.getStationCoupon = function (params) {
    return marketingRequest.postRequest({
        url: 'app/activity/station/couponDetail',
        data: params
    });
}; // 【站点详情 - 优惠说明】

exports.getStationDiscount = function (params) {
    return marketingRequest.postRequest({
        url: 'app/activity/station/discountDetail',
        data: params
    });
}; // 【累计活动详情】

exports.getConsumeActivityDetail = function (params) {
    return marketingRequest.getRequest({
        url: 'app/activity/consume/consumeActivityDetail',
        data: params
    });
}; //【充电流程-单笔折扣详情】

exports.getSingleDiscountDetail = function (params) {
    return marketingRequest.postRequest({
        url: 'app/activity/single/singleDiscountDetail',
        data: params
    });
}; //站点优惠详情

exports.getStationDiscountDetail = function (params) {
    return marketingRequest.postRequest({
        url: 'app/activity/stationDiscount/stationDiscountDetail',
        data: params
    });
}; // 优惠券列表

exports.getUserCoupon = function (params) {
    return marketingRequest.getRequest({
        url: 'app/user/coupon/pageCoupon',
        data: params
    });
};
